import request from '@/common/request'

export default {

  getList () {
    return new Promise((resolve, reject) => {
      request.get('/config').then(response => {
        resolve(response)
      })
    })
  },

  update (type, data) {
    return new Promise((resolve, reject) => {
      request.put('/config/'+type, data).then(response => {
        resolve(response)
      })
    })
  }
}
